import logging
import unittest

from config import DIR_PATH
from log.log import init_log_config
from scripys.test_Newcoupon import Testnewcoupon
from scripys.test_login import testlogin
from htmltestreport import HTMLTestReport

from scripys.test_query_person import testqueryPerson
from scripys.test_queryorgcoupons import Test_Query_Coupones

# 初始化日志的配置信息
init_log_config()

# 生成测试报告
# 创建套件实例
suite=unittest.TestSuite()
logging.info('测试套件实例，创建成功')
# 添加测试类
suite.addTest(unittest.makeSuite(testlogin))
suite.addTest(unittest.makeSuite(Testnewcoupon))
suite.addTest(unittest.makeSuite(testqueryPerson))
suite.addTest(unittest.makeSuite(Test_Query_Coupones))
# 创建testruuer实例
runner=HTMLTestReport(DIR_PATH +"/report/smart_login.html",description="接口测试报告描述",title="优惠券相关")
runner.run(suite)

